Fix custom suite teardown with omitted begin/end#841
Open
94xhn wants to merge 1 commit into
Open
Conversation
The omit-begin/end path generated a snake_case call, but the custom hook is defined as suiteTearDown. Generated C therefore failed strict C99 compilation. Constraint: Preserve app-owned Unity lifecycle setup and cleanup Rejected: Rename suiteTearDown | public docs use this hook name Confidence: high Scope-risk: narrow Directive: Match calls to the emitted teardown hook name Tested: Targeted regression, strict C99 compile, host run, Ruby syntax Not-tested: Full scripts suite beyond existing Windows EACCES
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🍍
Problem
When
omit_begin_endand a customsuite_teardownare enabled together, the generated runner definessuiteTearDown()but callssuite_teardown(0). Strict C99 compilation then fails because the called function does not exist.Fix
Call the emitted
suiteTearDown()hook in the omit-begin/end path and add a generator regression test for this option combination.Verification
-Werror=implicit-function-declaration; the fixed runner compiles.1 Tests 0 Failures 0 Ignored.git diff --checkpass.The full script suite passed the new regression and its first 38 existing cases before this Windows environment returned
EACCESwhile launching an existing generated executable.